<?php

if ($_POST["REGISTER_TYPE"] == "user") {
//echo "user";
$name = $_POST["USER_NAME"];
$surname = $_POST["USER_SURNAME"];
$address = $_POST["USER_ADDRESS"];
$email = $_POST["USER_EMAIL"];
$phone = $_POST["USER_PHONE"];
$username = $_POST["USER_USERNAME"];
$password = $_POST["USER_PASSWORD"];
$role = $_POST["USER_ROLE"];

$info_array = array("$name","$surname","$address","$email","$phone","$username","$password","$role");
user_create($info_array);
}
else if ($_POST["REGISTER_TYPE"] == "customer") {
//echo "customer";
$name = $_POST["CUSTOMER_NAME"];
$surname = $_POST["CUSTOMER_SURNAME"];
$address = $_POST["CUSTOMER_ADDRESS"];
$floor = $_POST["CUSTOMER_FLOOR"];
$phone = $_POST["CUSTOMER_PHONE"];
$username = $_POST["CUSTOMER_USERNAME"];
$password = $_POST["CUSTOMER_PASSWORD"];

$info_array = array("$name","$surname","$address","$floor","$phone","$username","$password");

customer_create($info_array);


}
else { echo "error"; }


















?>